﻿<%@ Page Title="文件管理" Language="C#" MasterPageFile="~/default.Master" AutoEventWireup="true"
    CodeBehind="Files.aspx.cs" Inherits="Webcar.SysManage.Files" %>

<%@ Register Src="../Controls/NaviBar.ascx" TagName="NaviBar" TagPrefix="uc1" %>
<%@ Register Src="../SearchPanel.ascx" TagName="SearchPanel" TagPrefix="uc2" %>
<%@ Register Assembly="WebPager" Namespace="DevCenterNew" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <uc1:NaviBar ID="NaviBar1" runat="server" />
    <uc2:SearchPanel ID="SearchPanel1" runat="server" />
    <asp:GridView ID="GridView1" runat="server" Width="100%" 
        SkinID="gridviewSkin_line" DataKeyNames="FileId"
        AutoGenerateColumns="False" onrowdatabound="GridView1_RowDataBound" 
        onrowcommand="GridView1_RowCommand" onrowdeleting="GridView1_RowDeleting">
        <Columns>
            <asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="文件名" ItemStyle-Width="200px">
                <ItemTemplate>
                    <asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl="#"><%#Eval("FileName")%></asp:HyperLink>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Left"></ItemStyle>
            </asp:TemplateField>
            <asp:BoundField DataField="FileLen" HeaderText="文件大小">
                <ItemStyle Width="100px"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="kind_name" HeaderText="文件分类">
                <ItemStyle Width="150px"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="FileDate" HeaderText="上传日期" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                <ItemStyle Width="150px"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="UploadMan" HeaderText="上传人">
                <ItemStyle Width="70px"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="Description" HeaderText="描述" ItemStyle-HorizontalAlign="Left">
            </asp:BoundField>
            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="文件名" ItemStyle-Width="50px">
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="DeleteBtn" Text="删除"  CommandName = "Delete"
                         CommandArgument='<%#Bind("fileid")%>'></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="pager">
        <div style="text-align:left;float:left;padding-top:4px; padding-left:5px;">
            <asp:HyperLink ID="HyperLink2" NavigateUrl="AddFiles.aspx" runat="server">上传新文件</asp:HyperLink>
        </div>
        <cc1:WebPager Width="400px" ID="WebPager1" runat="server" DisplayText="<span style='color: black'>第{0}页&nbsp共{1}页&nbsp总计{2}条&nbsp每页{3}条</span>" />
    </div>
</asp:Content>
